<?php
echo '<h1>TODO</h1>';

// Seminar
/*
echo '<hr/>';
$fb = new FormBuilder('seminar', $seminar);
$fb->displayOnly();
$fb->setAction('next');
$fb->autocompleter('name', $nameAcValues)->required();
$fb->date('begin_date')->required();
$fb->time('begin_time')->required();
$fb->date('end_date')->required();
$fb->time('end_time')->required();
$fb->textarea('description');
$fb->yesNoBox('publish');
$fb->textarea('notes');
$fb->write();

// Batches
echo '<hr/>';
if (count($this->data->batchList) > 0) {
    echo '<ul id="seminarBatchList" class="wizardEntityList">';
    foreach ($this->data->batchList as $index => $batch) {
        echo '<li>' .
             '<span class="entityName">' . $batch['name'] . '</span>&nbsp;' .
             html::anchor('admin/seminarWizard/seminarBatchDelete?index=' . $index, 'smazat', array('onclick'=>'return confirmDeletion()', 'title'=>text::get('button.delete-title')));
        echo '<div>';
        echo format::dateAndTime($batch['begin_date'], $batch['begin_time']) .
             ' - ' .
             format::dateAndTime($batch['end_date'], $batch['end_time']) . '<br/>';
        if ($batch['description']) {
            echo '<p><b>' . text::getEscaped('seminarBatch.description') . ':</b> ' . $batch['description'] . '</p>';
        }
        echo '</div>';
        echo '</li>';
    }
    echo '</ul>';
}

// Price groups
echo '<hr/>';
echo '<ul id="priceGroupList" class="wizardEntityList">';
foreach ($this->data->priceGroupList as $index => $group) {
    echo '<li>' .
         '<span class="entityName">' . $group['name'] . '</span>&nbsp;';
    if ($index > 0) {
         echo html::anchor('admin/seminarWizard/priceGroupDelete?index=' . $index, 'smazat', array('onclick'=>'return confirmDeletion()', 'title'=>text::get('button.delete-title')));
    }
    echo '<div>';
    echo '<p><b>' . text::getEscaped('priceGroup.currency_code') . ':</b> ' . $group['currency']['name'] . ' (' . $group['currency']['code'] . ')</p>';
    if ($group['countries']) {
        echo '<b>' . text::getEscaped('priceGroup.country_codes') . ':</b>';
        echo '<ul>';
        foreach ($group['countries'] as $country) {
            echo '<li>' . $country['name'] . ' (' . $country['code'] . ')</li>';
        }
        echo '</ul>';
    }
    if ($group['description']) {
        echo '<p style="max-width: 300px;"><b>' . text::getEscaped('priceGroup.description') . ':</b> ' . $group['description'] . '</p>';
    }
    echo '</div>';
    echo '</li>';
}
echo '</ul>';

// Languages
echo '<hr/>';
$fb = new FormBuilder('seminarWizard', $languageForm);
$fb->displayOnly();
$fb->setAction('next');
$fb->selectMany('language_codes', $languageOptions)->ajaxCreateButton('/language/languageEdit', '../language/save')->required();
$fb->write();
*/

// Program types
/*
$fb = new FormBuilder('seminarWizard', $programTypeForm);
$fb->displayOnly();
$fb->setAction('next');
$fb->selectMany('program_type_ids', $programTypeOptions)->ajaxCreateButton('/programType/programTypeEdit', '../programType/save')->required();
$fb->write();

// Karmayoga types
$fb = new FormBuilder('seminarWizard', $karmayogaTypeForm);
$fb->displayOnly();
$fb->setAction('next');
$fb->selectMany('karmayoga_type_ids', $karmayogaTypeOptions)->ajaxCreateButton('/karmayogaType/karmayogaTypeEdit', '../karmayogaType/save')->required();
$fb->write();

// Accomodation types
$fb = new FormBuilder('seminarWizard', $accomodationTypeForm);
$fb->displayOnly();
$fb->setAction('next');
$fb->selectMany('accomodation_type_ids', $accomodationTypeOptions)->ajaxCreateButton('/accomodationType/accomodationTypeEdit', '../accomodationType/save')->required();
$fb->write();
*/

// Age groups

// Categories
?>